# @Version  : 1.0
# @Author   : wgq
# @File     : test02.py
# @Date     : 2025/5/31 18:19
# dict1 = {}
# dict2 = dict()
# print(type(dict1))
# print(type(dict2))
# dict4={'tom':123,
#        'mary':12.3,
#        'jack':True,
#        'nono':[10,20,30],
#        'hsp':(100,200,300),
#        'smith':{
#            'age':18,
#            'sal':6000,
#            'entry_time':'2000-10-10'
#        }
#
# }
# print(dict4)
dict3 = {'one': 1, 'two': 2, 'three': 3}
# print(dict3[0])

# for key in dict3.keys():
#     print(f'key:{key},value:{dict3[key]}')
# for value  in dict3.values():
#     print(value)
# for item in dict3.items():
#     print(f'key:{item[0]},value:{item[1]}')
# list_name = ['西游记','三国演义','水浒传','红楼梦']
# list_author = ['吴承恩','罗贯中','施耐庵','曹雪芹']
# dict_book = {bookName :author for bookName,author in zip(list_name,list_author)}
# print(dict_book)
# print(dict_book['三国演义'])
# str = '韩顺平'
# dict = {ele1:ele2 * 2 for ele1, ele2 in zip(str, str)}
# print(dict)
set1 = {'tom', 'mary', 'jack', 'tom'}
print(set1)

print(f'集合元素数量为：{len(set1)}')
print('tom~' not in set1)
set1.add('smith')
print(set1)
set1.remove('tom')
print(set1)
ele = set1.pop()
print(ele)
print(set1)
book1 = {'天龙八部', '笑傲江湖'}
book2 = {'天龙八部', '神雕侠侣', '雪山飞狐'}
# book3 = book1.union(book2)
# print(book3)
# print(book1 | book2)
# print(book1 - book2)
# print(book1.difference(book2))
# book1.remove('天龙八部')
# print(book1)
# set2= {ele * 2 for ele in range(1,5)}
# print(set2)
# list1 = [ele * 2 for ele in range(1,5)]
# print(list1)
